(defun rst-compile-pseudo-region ()
  "Show the pseudo-XML rendering of the current active region,
or of the entire buffer, if the region is not selected."
  (interactive)
  (with-output-to-temp-buffer "*pseudoxml*"
    (shell-command-on-region
     (if mark-active (region-beginning) (point-min))
     (if mark-active (region-end) (point-max))
     "rst2pseudoxml.py"
     standard-output)))